package com.gxm.base.grammar_运算语法.循环;

public class ForDemo {
    public static void main(String[] args){
        //九九乘法表
        for(int x=1;x<=9;x++){
            for(int y=1;y<=x;y++){
                System.out.print(y+"*"+x+"="+y*x+"\t");
            }
            System.out.println();
        }
        System.out.println("===========================================");
        //倒三角
        /*
        * * * * * *
        *  * * * *
        *   * * *
        *    * *
        *     *
        */
        for(int x=0;x<=5;x++){
          for(int y=1;y<=x;y++){
              System.out.print(" ");
          }
          for(int z=x;z<5;z++){
              System.out.print("* ");
          }
          System.out.println();
        }
    }
}
